package com.example.cloudconsumer;

import com.example.cloudconsumer.service.RemoteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: SPL
 * @Date: 2019-07-24 11:09
 * @Description: -
 */
@RestController
@RefreshScope
public class ConsumerController {

    @Autowired
    private RemoteService remoteService;

    @RequestMapping("/test")
    public String testRemote(){
        return remoteService.callMethod();
    }

}
